package com.ftg.learn.controller;

import cn.hutool.core.lang.tree.Tree;
import com.ftg.learn.service.SysPermissionService;
import com.ftg.learn.util.R;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 布衣
 */
@RestController
@Tag(name = "权限接口")
@RequestMapping("/permission")
public class SysPermissionController {

    @Resource
    private SysPermissionService sysPermissionService;

    @GetMapping("/list")
    public R<List<Tree<Long>>> list(){
        return sysPermissionService.list();
    }
}
